package com.msb;

import java.util.Objects;
import java.util.Properties;

public class PropertyMgr {

    static Properties props = new Properties();

    static {

        try {
            props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config"));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }

    public static Object getProperty(String key) {
        if (props==null) {return null;}

        return props.getProperty(key);
    }

    public static void main(String[] args) {
        System.out.println(PropertyMgr.getProperty("initTankCount"));
    }
}
